#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define XH(i,a,b) for(int i = a; i < b; ++i)
#define XXH(i,b,a) for(int i = b; i >= a; --i)
#define Module 998244353
int tmpInt;ll tmpll;string tmpStr;char tmpChar;
vector<int>tmpIntVector;

struct baggage{
  int w,v;
  bool operator<(const baggage &b) const{
    return this->v < b.v;
  }
};

struct box{
  int x,index;
  bool operator<(const box &b) const{
    return this->x < b.x;
  }
};

int main(){
  #ifndef ONLINE_JUDGE
    auto start_clock = clock();
    //freopen("input.txt","r",stdin);
//  freopen("output.txt","w",stdout);
  #endif

  int n,m,q;
  cin>>n>>m>>q;
  baggage baggages[n];
  XH(i,0,n){
    cin>>baggages[i].w>>baggages[i].v;
  }
  sort(baggages,baggages+n);
  box boxes[m];
  XH(i,0,m){
    cin>>boxes[i].x;
    boxes[i].index = i;
  }
  sort(boxes,boxes+m);

  XH(i,0,q){
    int l,r;
    int isavailable[m];
    fill(isavailable,isavailable+m,1);
    cin>>l>>r;
    XH(j,l-1,r)isavailable[j] = 0;
    int left = 0, right = m, mid;
    int cnt = 0;
    ll ans = 0;
    while(1){
     while(left<=right){
       mid = left + (right-left)/2;
       if(boxes[mid].x > baggages[cnt].w){
         right = mid - 1;
       }else{
         left = mid + 1;
       }
     }
     if(boxes[mid].x < baggages[cnt].w) mid++;
     while(mid < m && isavailable[boxes[mid].index] == 0) mid++;
     if(mid < m){
       isavailable[boxes[mid].index] = 0;
       ans += baggages[cnt].v;
     }
     cnt++;
     if(cnt==n)break;
    }
    printf("%lld\n",ans);
  }
  
  #ifndef ONLINE_JUDGE
    auto end_clock = clock();
    //cout<<"runtime: "<<end_clock - start_clock<<"ms"<<endl;
  #endif
  return 0;
}
